package com.ruoyi.costumeShop.controller;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
import com.google.gson.annotations.JsonAdapter;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.costumeShop.domain.RefundOrderCostume;
import com.ruoyi.costumeShop.domain.SaleOrderCostume;
import com.ruoyi.costumeShop.service.IRefundOrderCostumeService;
import com.ruoyi.costumeShop.vo.RefundSaleOrderCostumeVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/costumeShop/refundOrderCostume")


public class RefundOrderCostumeController extends BaseController {
     @Autowired
    private IRefundOrderCostumeService refundOrderCostumeService;

    /**
     * 查询refundSaleOrderDetail列表
     */
    @PreAuthorize("@ss.hasPermi('costumeShop:refundOrderCostume:query')")
    @GetMapping(value = "/{orderNo}")
    public TableDataInfo list(@PathVariable("orderNo") String saleOrderNo){
        List<RefundOrderCostume> list = refundOrderCostumeService.selectRefundSaleOrderCostumeListBySaleOrderId(saleOrderNo);

       // System.out.print("WWWWWWWWWcontroller得到的是"+refundOrderCostumeService.selectRefundSaleOrderCostumeListBySaleOrderId(saleOrderNo));
       // for(RefundOrderCostume refundOrderCostume:list){
        //    refundOrderCostume.setCostumeName("\""+refundOrderCostume.costumeName().toString()+"\",");
        //    refundOrderCostume.setCostumeNo("\""+refundOrderCostume.costumeNo().toString()+"\"");
        //    refundOrderCostume.setCostumeOrderNo("\""+refundOrderCostume.costumeOrderNo().toString()+"\"");
        //    refundOrderCostume.setSize("\""+refundOrderCostume.size().toString()+"\"");

       // }


        return getDataTable(list);

    }
//TableDataInfo   getDataTable(list)
}
